﻿using System;

using System.Data.SqlClient;


namespace MyOrder
{
    public class SqlConnectionLianJie
    {
        public static string lianjieStr { get; set; }
        public static  string GetConnection()
        {
            try
            {
                string connString = "Data Source="+ lianjieStr + ";Initial Catalog=Veh_Comprehensive;User ID=bhkj;Password=baohuilianwang";
                using (SqlConnection conn = new SqlConnection(connString))
                {
                    conn.Open();
                    conn.Close(); 
                }
                return connString;
            }
            catch (Exception ex)
            {
                //throw new Exception("数据库连接失败", ex);
                return "1";

            }
        }
    }
}
